package sk.octopuss.archery.utils;

import javax.annotation.PostConstruct;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.convert.support.DefaultConversionService;
import org.springframework.stereotype.Component;

import sk.octopuss.archery.converter.StringToBrandConverter;
import sk.octopuss.archery.converter.StringToCategoryConverter;

@Component("applicationConversionService")
public class ApplicationConversionService  extends DefaultConversionService {
	
	@Autowired
	private StringToBrandConverter s2BrandConverter;
	
	@Autowired
	private StringToCategoryConverter s2CategoryConverter;
	
	
	
	@PostConstruct
	public void setConverters() {
        this.addConverter(s2BrandConverter);
        this.addConverter(s2CategoryConverter);
    }
}
